
<!DOCTYPE HTML>
<html lang="zh-hans" >
    <head>
        <meta charset="UTF-8">
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <title>DAY02 数据类型到进制 · JavaSE笔记</title>
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.3">
        <meta name="author" content="zh">
        
        
    
    <link rel="stylesheet" href="gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-search-pro/search.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-pageview-count/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-splitter/splitter.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-back-to-top-button/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-code/plugin.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-highlight/website.css">
                
            
                
                <link rel="stylesheet" href="gitbook/gitbook-plugin-fontsettings/website.css">
                
            
        

    

    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="DAY02 回忆式笔记.html" />
    
    
    <link rel="prev" href="DAY01 笔记.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
<div id="book-search-input" role="search">
    <input type="text" placeholder="输入并搜索" />
</div>

            
                <nav role="navigation">
                


<ul class="summary">
    
    

    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="./">
            
                <a href="./#向导">
            
                    
                    向导
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1.1" data-path="./">
            
                <a href="./#技巧&工具">
            
                    
                    技巧&工具
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.1.2" data-path="./">
            
                <a href="./#基础部分">
            
                    
                    基础部分
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#day01-java编程基础">
            
                    
                    DAY01 java编程基础
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#一、java语言概述">
            
                    
                    一、java语言概述
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#1-课程整体内容概述">
            
                    
                    1_ 课程整体内容概述
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#2-java语言概述">
            
                    
                    2_ Java语言概述
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.2.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#1、基础常识">
            
                    
                    1、基础常识
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.2.1.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#11硬件（hardware）">
            
                    
                    1.1硬件（Hardware）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2.1.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#12软件（software）">
            
                    
                    1.2软件（SoftWare）
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.2.1.2.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#121系统软件（operation-system）">
            
                    
                    1.2.1系统软件（Operation System）
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2.1.2.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#122应用软件">
            
                    
                    1.2.2应用软件
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.1.2.1.3" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#13dos命令">
            
                    
                    1.3Dos命令
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.2.1.3.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#131常用dos命令command">
            
                    
                    1.3.1常用DOS命令(command)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.2.1.3.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#132命令的分类">
            
                    
                    1.3.2命令的分类
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.1.3" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#3-计算机语言的发展迭代史">
            
                    
                    3_ 计算机语言的发展迭代史
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.4" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#4-java语言版本迭代概述">
            
                    
                    4_ Java语言版本迭代概述
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.5" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#5-java语言应用的领域">
            
                    
                    5_ Java语言应用的领域
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.6" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#6-java语言的特点">
            
                    
                    6_ Java语言的特点
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1.6.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#1主要特性">
            
                    
                    1.主要特性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.1.6.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#2面向对象性">
            
                    
                    2.面向对象性
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.1.7" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#7-java两种核心机制">
            
                    
                    7_ Java两种核心机制
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#二、开发环境的搭建（重点）">
            
                    
                    二、开发环境的搭建（重点）
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#1-jdk、jre、jvm的关系">
            
                    
                    1_ JDK、JRE、JVM的关系
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#2-jdk的下载、安装">
            
                    
                    2_ JDK的下载、安装
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.3" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#3-path环境变量的配置">
            
                    
                    3_ path环境变量的配置
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.2.3.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#1、为什么配置path环境变量？">
            
                    
                    1、为什么配置path环境变量？
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2.3.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#12、如何配置？">
            
                    
                    1.2、如何配置？
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#三、第一个java程序">
            
                    
                    三、第一个Java程序
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.3.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#1、开发体验—helloworld">
            
                    
                    1、开发体验—HelloWorld
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.3.1.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#11编写">
            
                    
                    1.1编写
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.1.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#12编译">
            
                    
                    1.2编译
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.1.3" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#13运行">
            
                    
                    1.3运行
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.3.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#2常见问题的解决">
            
                    
                    2.常见问题的解决
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3.3" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#3总结第一个程序">
            
                    
                    3.总结第一个程序
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.2.4" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#四、注释与api文档">
            
                    
                    四、注释与API文档
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.4.1" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#1注释：comment">
            
                    
                    1.注释：Comment
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.2" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#2java-api-文档">
            
                    
                    2.Java API 文档
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.4.3" data-path="DAY01 笔记.html">
            
                <a href="DAY01 笔记.html#3良好的编程风格">
            
                    
                    3.良好的编程风格
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#day02-数据类型到进制">
            
                    
                    DAY02 数据类型到进制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#基本数据类型">
            
                    
                    基本数据类型
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1.1" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#引用类型和基本类型的区别">
            
                    
                    引用类型和基本类型的区别
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.2" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#浮点数为什么不精准整数是不是精准的为什么">
            
                    
                    浮点数为什么不精准整数是不是精准的为什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.3" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#强类型的好处是什么">
            
                    
                    强类型的好处是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.4" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#简要描述java中的8种数据类型">
            
                    
                    简要描述java中的8种数据类型
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#变量的使用与类型兼容性">
            
                    
                    变量的使用与类型兼容性
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.1" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#变量使用时有哪些注意事项">
            
                    
                    变量使用时有哪些注意事项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#变量赋值的兼容机制">
            
                    
                    变量赋值的兼容机制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.3" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#什么是变量什么是常量什么是字面量">
            
                    
                    什么是变量什么是常量什么是字面量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.4" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#数值字面值的默认类型是什么">
            
                    
                    数值字面值的默认类型是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.5" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#编译器对变量和常量如何区别处理">
            
                    
                    编译器对变量和常量如何区别处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.6" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#为什么浮点数没有变量常量区别处理">
            
                    
                    为什么浮点数没有变量常量区别处理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.7" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#数值范围从小到大的排序是什么">
            
                    
                    数值范围从小到大的排序是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.8" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#自动类型提升的主要规则数值型">
            
                    
                    自动类型提升的主要规则(数值型)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.9" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#强制类型转换">
            
                    
                    强制类型转换
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#字符与字符串">
            
                    
                    字符与字符串
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.3.1" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#字符型存储的究竟是什么">
            
                    
                    字符型存储的究竟是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.2" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#字符串引用类型">
            
                    
                    字符串(引用类型)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.3.3" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#字符串转换">
            
                    
                    字符串转换
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#进制">
            
                    
                    进制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.4.1" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#权值是什么各进制如何表示">
            
                    
                    权值是什么各进制如何表示
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4.2" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#研究16进制的意义是什么">
            
                    
                    研究16进制的意义是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4.3" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#8421法实现16进制与2进制互转">
            
                    
                    8421法实现16进制与2进制互转
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4.4" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#什么是补码了解">
            
                    
                    什么是补码(了解)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4.5" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#补码和-1分别解决了什么问题">
            
                    
                    补码和-1分别解决了什么问题
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4.6" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#byte的最大值为什么是127">
            
                    
                    byte的最大值为什么是127
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.5" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#额外补充">
            
                    
                    额外补充
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.5.1" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#b问题">
            
                    
                    \b问题
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.6" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#练习">
            
                    
                    练习
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.6.1" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#练习1-打印自己的姓名和相应码值">
            
                    
                    练习1 打印自己的姓名和相应码值
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6.2" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#练习2-字符串拼接-打印个人信息">
            
                    
                    练习2 字符串拼接 打印个人信息
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6.3" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#练习3-动态打印计算过程">
            
                    
                    练习3 动态打印计算过程
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6.4" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#练习4-16进制与2进制转10进制">
            
                    
                    练习4 16进制与2进制转10进制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6.5" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#练习5-16进制和2进制互转">
            
                    
                    练习5 16进制和2进制互转
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.6.6" data-path="DAY02 回忆式笔记.html">
            
                <a href="DAY02 回忆式笔记.html#练习6-正负2进制转10进制数">
            
                    
                    练习6 正负2进制转10进制数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#day03-回忆式笔记">
            
                    
                    DAY03 回忆式笔记
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#内存与变量机制">
            
                    
                    内存与变量机制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#地址编号是什么">
            
                    
                    地址编号是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.1.2" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#变量可以声明在什么位置-有什么区别">
            
                    
                    变量可以声明在什么位置 有什么区别
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#运算符">
            
                    
                    运算符
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.2.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#位运算符">
            
                    
                    位运算符
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.2.1.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#补充异或加密实践">
            
                    
                    补充异或加密实践
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2.2" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#算术运算符">
            
                    
                    算术运算符
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.2.2.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#除法运算注意点">
            
                    
                    除法运算注意点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.2.2" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#求余运算注意点">
            
                    
                    求余运算注意点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.2.3" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#后++和前++注意点">
            
                    
                    后++和前++注意点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.2.4" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#字符串+运算注意点">
            
                    
                    字符串+运算注意点
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2.3" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#赋值运算注意点">
            
                    
                    赋值运算注意点
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.2.3.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#扩展操作运算符">
            
                    
                    扩展操作运算符
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2.4" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#比较运算符">
            
                    
                    比较运算符
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.2.4.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#为什么不能连续比较">
            
                    
                    为什么不能连续比较
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.2.5" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#逻辑运算符">
            
                    
                    逻辑运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.6" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#三元运算符">
            
                    
                    三元运算符
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2.7" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#运算符优先级">
            
                    
                    运算符优先级
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#流程控制">
            
                    
                    流程控制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.3.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#什么是流程-有几种流程控制">
            
                    
                    什么是流程 有几种流程控制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.2" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#分支语句1:-if-else-及其">
            
                    
                    分支语句1: if-else 及其
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.3.2.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#3种方式">
            
                    
                    3种方式
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.2.2" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#嵌套">
            
                    
                    嵌套
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.2.3" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#无花括号语法">
            
                    
                    无花括号语法
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.3.3" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#分支语句2:-switch-case">
            
                    
                    分支语句2: switch case
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.3.3.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#使用switch的相关规则">
            
                    
                    使用switch的相关规则
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3.3.2" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#没有break会怎么样">
            
                    
                    没有break会怎么样
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#额外补充">
            
                    
                    额外补充
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.4.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#java如何得到命令行参数">
            
                    
                    java如何得到命令行参数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#练习">
            
                    
                    练习
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.5.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#练习1-按位与,-或-,-异或运算">
            
                    
                    练习1 按位与, 或 , 异或运算
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.2" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#练习2-算数运算符:-自加,-自减">
            
                    
                    练习2 算数运算符: 自加, 自减
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.3" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#练习3-与、或、短语与和短路或">
            
                    
                    练习3 与、或、短语与和短路或
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.4" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#练习4-三元运算符-2数较大-3数较大">
            
                    
                    练习4 三元运算符 2数较大 3数较大
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.5" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#练习5-if-else-奖励小明">
            
                    
                    练习5 if else 奖励小明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.6" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#练习6">
            
                    
                    练习6
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.7" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#练习7-用switch改写if语句">
            
                    
                    练习7 用switch改写if语句
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5.8" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#练习8-用switch为输入的月份判断季节">
            
                    
                    练习8 用switch为输入的月份判断季节
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4.6" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#作业">
            
                    
                    作业
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.6.1" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#作业1-将3个数字从小到大排列">
            
                    
                    作业1 将3个数字从小到大排列
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6.2" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#作业2">
            
                    
                    作业2
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6.3" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#作业3">
            
                    
                    作业3
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.6.4" data-path="DAY03 回忆式笔记.html">
            
                <a href="DAY03 回忆式笔记.html#作业4">
            
                    
                    作业4
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#day04-回忆式笔记">
            
                    
                    DAY04 回忆式笔记
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.1" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#冒泡排序">
            
                    
                    冒泡排序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#循环结构">
            
                    
                    循环结构
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.2.1" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#循环语句的功能是什么">
            
                    
                    循环语句的功能是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.2" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#循环语句的四个组成部分">
            
                    
                    循环语句的四个组成部分
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.3" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#while-循环">
            
                    
                    while 循环
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.4" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#do-while-循环">
            
                    
                    do-while 循环
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.5" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#while-循环结构特点">
            
                    
                    while 循环结构特点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.6" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#for-循环">
            
                    
                    for 循环
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.7" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#for-循环结构特点">
            
                    
                    for 循环结构特点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.8" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#for循环与if嵌套">
            
                    
                    for循环与if嵌套
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.9" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#for循环嵌套">
            
                    
                    for循环嵌套
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.10" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#for循环打印控制">
            
                    
                    for循环打印控制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.2.11" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#for循环判断质数">
            
                    
                    for循环判断质数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.3" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#额外补充">
            
                    
                    额外补充
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.3.1" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#null-和-null-的区别是什么">
            
                    
                    NULL 和 null 的区别是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.3.2" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#什么是质数">
            
                    
                    什么是质数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.4" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#练习">
            
                    
                    练习
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.4.1" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#练习1-使用while循环打印矩阵">
            
                    
                    练习1 使用while循环打印矩阵
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.2" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#练习2-使用do-while-循环打印矩阵">
            
                    
                    练习2 使用do while 循环打印矩阵
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.3" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#练习3-for循环打印矩形">
            
                    
                    练习3 for循环打印矩形
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.4" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#练习4-1000以内能被7整除的数的平均值">
            
                    
                    练习4 1000以内能被7整除的数的平均值
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.5" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#练习5-for-循环嵌套打印矩阵">
            
                    
                    练习5 for 循环嵌套打印矩阵
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.6" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#练习6-for循环嵌套打印三角形">
            
                    
                    练习6 for循环嵌套打印三角形
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.4.7" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#练习7-for循环-找质数">
            
                    
                    练习7 for循环 找质数
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.5.5" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#作业">
            
                    
                    作业
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.5.5.1" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#作业1-冒泡排序">
            
                    
                    作业1 冒泡排序
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.2" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#作业2-等腰三角形打印控制">
            
                    
                    作业2 等腰三角形打印控制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.5.5.3" data-path="DAY04 回忆式笔记.html">
            
                <a href="DAY04 回忆式笔记.html#作业3-求1000以内质数的平均值">
            
                    
                    作业3 求1000以内质数的平均值
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#day05-回忆式笔记">
            
                    
                    DAY05 回忆式笔记
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#死循环问题">
            
                    
                    死循环问题
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.1.1" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#while语句死循环">
            
                    
                    while语句死循环
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.2" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#for语句死循环">
            
                    
                    for语句死循环
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.1.3" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#像但不是死循环">
            
                    
                    像但不是死循环
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.2" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#循环的特殊流程控制">
            
                    
                    循环的特殊流程控制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.2.1" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#break-语句">
            
                    
                    break 语句
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.2" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#循环的标签与break联合">
            
                    
                    循环的标签与break联合
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.3" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#场景回顾-找质数与break">
            
                    
                    场景回顾 找质数与break
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.2.4" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#break中断某个语句块">
            
                    
                    break中断某个语句块
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.3" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#continue-语句">
            
                    
                    continue 语句
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.3.1" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#continue-和-break-小有不同">
            
                    
                    continue 和 break 小有不同
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.3.2" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#循环的标签与continue结合">
            
                    
                    循环的标签与continue结合
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.4" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#return-语句">
            
                    
                    return 语句
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.5" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#特殊控制语句说明">
            
                    
                    特殊控制语句说明
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#方法method">
            
                    
                    方法(method)
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.6.1" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#什么是方法函数">
            
                    
                    什么是方法(函数)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.2" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#方法的组成">
            
                    
                    方法的组成
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.3" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#方法的调用">
            
                    
                    方法的调用
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.4" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#方法无参无返回值的情况-void">
            
                    
                    方法无参无返回值的情况 void
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.5" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#形参实参注意事项">
            
                    
                    形参实参注意事项
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.6.6" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#方法调用时发生了什么事情">
            
                    
                    方法调用时发生了什么事情
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.7" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#方法的重载overload">
            
                    
                    方法的重载(overload)
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.7.1" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#重载的概念">
            
                    
                    重载的概念
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7.2" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#重载的特点">
            
                    
                    重载的特点
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7.3" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#形参和实参的兼容性匹配">
            
                    
                    形参和实参的兼容性匹配
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7.4" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#方法签名到底签的是什么">
            
                    
                    方法签名到底签的是什么
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7.5" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#重载的精准调用兼容度">
            
                    
                    重载的精准调用(兼容度)
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7.6" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#println源码为什么名字相同的时候才重载">
            
                    
                    println源码为什么名字相同的时候才重载
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7.7" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#连环调还是独立方法好">
            
                    
                    连环调还是独立方法好
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.7.8" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#功能弱的方法要不要干掉">
            
                    
                    功能弱的方法要不要干掉
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.8" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#方法参数的传递">
            
                    
                    方法参数的传递
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.9" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#重点!!方法调用的分析">
            
                    
                    (重点!!)方法调用的分析
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.9.1" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#方法执行时究竟是怎么执行的栈!">
            
                    
                    方法执行时究竟是怎么执行的栈!
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.6.10" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#练习">
            
                    
                    练习
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.6.10.1" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#练习1-for循环打印空心矩形">
            
                    
                    练习1 for循环打印空心矩形
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.2" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#练习2-break循环控制">
            
                    
                    练习2 break循环控制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.3" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#练习3-continue-整除控制">
            
                    
                    练习3 continue 整除控制
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.4" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#练习4-方法声明及其调用-add">
            
                    
                    练习4 方法声明及其调用 add
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.5" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#练习5-调用方法打印矩形">
            
                    
                    练习5 调用方法打印矩形
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.6" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#练习6-调用方法打印矩形及其周长">
            
                    
                    练习6 调用方法打印矩形及其周长
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.7" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#练习7-判断哪个方法是重载">
            
                    
                    练习7 判断哪个方法是重载
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.8" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#练习8-重载一个打印正方形的方法">
            
                    
                    练习8 重载一个打印正方形的方法
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.6.10.9" data-path="DAY05 回忆式笔记.html">
            
                <a href="DAY05 回忆式笔记.html#练习9-用连环调来打印矩形-并切换图形的图案">
            
                    
                    练习9 用连环调来打印矩形 并切换图形的图案
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            本书使用 GitBook 发布
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="." >DAY02 数据类型到进制</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
<div id="book-search-results">
    <div class="search-noresults">
    
                                <section class="normal markdown-section">
                                
                                <h1 id="day02-&#x6570;&#x636E;&#x7C7B;&#x578B;&#x5230;&#x8FDB;&#x5236;">DAY02 &#x6570;&#x636E;&#x7C7B;&#x578B;&#x5230;&#x8FDB;&#x5236;</h1>
<blockquote>
<p>author: &#x9093;&#x5B50;&#x7426;</p>
</blockquote>
<h2 id="&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;">&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;</h2>
<h3 id="&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x548C;&#x57FA;&#x672C;&#x7C7B;&#x578B;&#x7684;&#x533A;&#x522B;"><strong>&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x548C;&#x57FA;&#x672C;&#x7C7B;&#x578B;&#x7684;&#x533A;&#x522B;?</strong></h3>
<ol>
<li><p>&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;( primitive):&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x4E2D;&#x4FDD;&#x5B58;&#x6570;&#x636E;&#x672C;&#x8EAB;</p>
</li>
<li><p>&#x5F15;&#x7528;&#x6570;&#x636E;&#x7C7B;&#x578B;( reference):&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x4E2D;&#x4FDD;&#x5B58;&#x5BF9;&#x8C61;&#x7684;&#x5730;&#x5740;</p>
</li>
<li><p><strong>null</strong>&#x53EA;&#x80FD;&#x7ED9;&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x8D4B;&#x503C;,&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x4E0D;&#x80FD;&#x7528;null</p>
</li>
<li>&#x5F15;&#x7528;&#x7684;&#x672C;&#x8D28;&#x5C31;&#x662F;&#x6307;&#x9488;</li>
</ol>
<p><img src="DAY02 &#x56DE;&#x5FC6;&#x5F0F;&#x7B14;&#x8BB0;.assets/image-20210822090105655.png" alt="image-20210822090105655"></p>
<h3 id="&#x6D6E;&#x70B9;&#x6570;&#x4E3A;&#x4EC0;&#x4E48;&#x4E0D;&#x7CBE;&#x51C6;&#x6574;&#x6570;&#x662F;&#x4E0D;&#x662F;&#x7CBE;&#x51C6;&#x7684;&#x4E3A;&#x4EC0;&#x4E48;"><strong>&#x6D6E;&#x70B9;&#x6570;&#x4E3A;&#x4EC0;&#x4E48;&#x4E0D;&#x7CBE;&#x51C6;?&#x6574;&#x6570;&#x662F;&#x4E0D;&#x662F;&#x7CBE;&#x51C6;&#x7684;?&#x4E3A;&#x4EC0;&#x4E48;?</strong></h3>
<p>&#x56E0;&#x4E3A;<strong>&#x7A7A;&#x95F4;&#x6709;&#x9650;,&#x6709;&#x9650;&#x7684;&#x7A7A;&#x95F4;&#x65E0;&#x6CD5;&#x5B58;&#x50A8;&#x65E0;&#x9650;&#x7684;&#x6570;&#x636E;</strong>,&#x5F53;&#x9047;&#x5230;<strong>&#x65E0;&#x9650;&#x5FAA;&#x73AF;&#x5C0F;&#x6570;</strong>&#x6216;<strong>&#x65E0;&#x9650;&#x4E0D;&#x5FAA;&#x73AF;&#x5C0F;&#x6570;(&#x65E0;&#x7406;&#x6570;)</strong>&#x5FC5;&#x987B;&#x91C7;&#x53D6;&#x622A;&#x65AD;&#x6216;&#x8005;&#x8FD1;&#x4F3C;.</p>
<p>&#x6574;&#x6570;&#x662F;&#x7CBE;&#x51C6;&#x7684;,&#x56E0;&#x4E3A;&#x6574;&#x6570;&#x662F;&#x6709;&#x9650;&#x7684;.</p>
<h3 id="&#x5F3A;&#x7C7B;&#x578B;&#x7684;&#x597D;&#x5904;&#x662F;&#x4EC0;&#x4E48;">&#x5F3A;&#x7C7B;&#x578B;&#x7684;&#x597D;&#x5904;&#x662F;&#x4EC0;&#x4E48;?</h3>
<p>&#x5728;java&#x4E2D;&#x53D8;&#x91CF;&#x4E00;&#x65E6;&#x58F0;&#x660E;,&#x7A7A;&#x95F4;&#x5927;&#x5C0F;&#x5C31;&#x662F;&#x56FA;&#x5B9A;&#x7684;,&#x4ECE;&#x800C;&#x4FDD;&#x8BC1;&#x4E86;&#x7A0B;&#x5E8F;&#x7684;&#x5065;&#x58EE;&#x6027;&#x548C;&#x5B8C;&#x5584;&#x7684;&#x5F02;&#x5E38;&#x5904;&#x7406;&#x673A;&#x5236;.</p>
<blockquote>
<p>&#x8FD9;&#x4E2A;&#x597D;&#x5904;&#x4E3B;&#x8981;&#x662F;&#x5BF9;&#x7F16;&#x8BD1;&#x5668;&#x6765;&#x8BF4;&#x7684;,&#x5F3A;&#x7C7B;&#x578B;&#x7684;&#x8BED;&#x8A00;&#x53EF;&#x4EE5;&#x66F4;&#x597D;&#x5730;&#x901A;&#x8FC7;&#x7F16;&#x8BD1;&#x5668;&#x7684;&#x7F16;&#x8BD1;(&#x56E0;&#x4E3A;&#x90FD;&#x662F;&#x5B9A;&#x6B7B;&#x7684;&#x4E1C;&#x897F;),&#x4ECE;&#x800C;&#x5F62;&#x6210;&#x9AD8;&#x5065;&#x58EE;&#x6027;&#x7A0B;&#x5E8F;.</p>
<p>&#x52A8;&#x6001;&#x7C7B;&#x578B;&#x7684;&#x8BED;&#x8A00;,&#x53D8;&#x91CF;&#x7C7B;&#x578B;&#x7531;&#x7F16;&#x8BD1;&#x5668;&#x52A8;&#x6001;&#x51B3;&#x5B9A;,&#x6765;&#x56DE;&#x8D4B;&#x503C;&#x7684;&#x65F6;&#x5019;&#x5C31;&#x6709;&#x53EF;&#x80FD;&#x53D1;&#x751F;&#x51FA;&#x4E4E;&#x610F;&#x6599;&#x7684;&#x4E8B;&#x60C5;.&#x4ECE;&#x800C;&#x53EF;&#x80FD;&#x5BFC;&#x81F4;&#x5404;&#x79CD;BUG</p>
</blockquote>
<h3 id="&#x7B80;&#x8981;&#x63CF;&#x8FF0;java&#x4E2D;&#x7684;8&#x79CD;&#x6570;&#x636E;&#x7C7B;&#x578B;">&#x7B80;&#x8981;&#x63CF;&#x8FF0;java&#x4E2D;&#x7684;8&#x79CD;&#x6570;&#x636E;&#x7C7B;&#x578B;</h3>
<table>
<thead>
<tr>
<th>&#x4E00;&#x7EA7;&#x5206;&#x7C7B;</th>
<th>&#x4E8C;&#x7EA7;&#x5206;&#x7C7B;</th>
<th>&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;</th>
<th>&#x5B57;&#x8282;&#x957F;&#x5EA6;</th>
<th>&#x6570;&#x503C;&#x8303;&#x56F4;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x6570;&#x503C;&#x578B;</td>
<td>&#x6574;&#x6570;</td>
<td>byte</td>
<td>1</td>
<td>-128~127</td>
</tr>
<tr>
<td>&#x6570;&#x503C;&#x578B;</td>
<td>&#x6574;&#x6570;</td>
<td>short</td>
<td>2</td>
<td>-32768~32767</td>
</tr>
<tr>
<td>&#x6570;&#x503C;&#x578B;</td>
<td>&#x6574;&#x6570;</td>
<td>int</td>
<td>4</td>
<td>-20&#x591A;&#x4EBF;~20&#x591A;&#x4EBF;</td>
</tr>
<tr>
<td>&#x6570;&#x503C;&#x578B;</td>
<td>&#x6574;&#x6570;</td>
<td>long</td>
<td>8</td>
<td>-900&#x591A;&#x4EBF;~900&#x591A;&#x4EBF;</td>
</tr>
<tr>
<td>&#x5B57;&#x7B26;&#x578B;</td>
<td>&#x5B57;&#x7B26;</td>
<td>char</td>
<td>2</td>
<td>0~65535</td>
</tr>
<tr>
<td>&#x5E03;&#x5C14;&#x578B;</td>
<td>&#x903B;&#x8F91;</td>
<td>boolean</td>
<td>1</td>
<td>[ture,false]</td>
</tr>
</tbody>
</table>
<h2 id="&#x53D8;&#x91CF;&#x7684;&#x4F7F;&#x7528;&#x4E0E;&#x7C7B;&#x578B;&#x517C;&#x5BB9;&#x6027;">&#x53D8;&#x91CF;&#x7684;&#x4F7F;&#x7528;&#x4E0E;&#x7C7B;&#x578B;&#x517C;&#x5BB9;&#x6027;</h2>
<h3 id="&#x53D8;&#x91CF;&#x4F7F;&#x7528;&#x65F6;&#x6709;&#x54EA;&#x4E9B;&#x6CE8;&#x610F;&#x4E8B;&#x9879;"><strong>&#x53D8;&#x91CF;&#x4F7F;&#x7528;&#x65F6;&#x6709;&#x54EA;&#x4E9B;&#x6CE8;&#x610F;&#x4E8B;&#x9879;?</strong></h3>
<ol>
<li><p>&#x5FC5;&#x987B;&#x6709;&#x53D8;&#x91CF;&#x7C7B;&#x578B;&#x548C;&#x53D8;&#x91CF;&#x540D;.</p>
</li>
<li><p>&#x53D8;&#x91CF;&#x4E0D;&#x53EF;&#x4EE5;&#x91CD;&#x590D;&#x58F0;&#x660E;</p>
</li>
</ol>
<pre><code class="lang-java"><span class="hljs-keyword">int</span> n1; <span class="hljs-comment">// &#x53D8;&#x91CF;&#x58F0;&#x660E; declare &#x58F0;&#x660E;</span>
<span class="hljs-keyword">long</span> n1; <span class="hljs-comment">// !&#x76F8;&#x5F53;&#x4E8E;&#x8BA9;&#x53D8;&#x91CF;&#x5F15;&#x7528;&#x53E6;&#x4E00;&#x5757;&#x7A7A;&#x95F4;!&#x91CD;&#x5A5A;&#x7F6A; &#x53D8;&#x91CF;&#x4E0D;&#x5141;&#x8BB8;&#x91CD;&#x590D;&#x58F0;&#x660E;</span>
</code></pre>
<ol>
<li>&#x53D8;&#x91CF;&#x6709;&#x5176;&#x4F5C;&#x7528;&#x8303;&#x56F4;&#xFF0C;&#x5728;&#x5176;&#x8303;&#x56F4;&#x5185;&#x53D8;&#x91CF;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;&#xFF0C;&#x5728;&#x8303;&#x56F4;&#x5916;&#x53D8;&#x91CF;&#x4E0D;&#x53EF;&#x4EE5;&#x4F7F;&#x7528;
<strong>&#x4F5C;&#x7528;&#x8303;&#x56F4;&#x7531;&#x53D8;&#x91CF;&#x58F0;&#x660E;&#x6240;&#x5728;&#x7684;&#x4E00;&#x5BF9;{}&#x6240;&#x51B3;&#x5B9A;</strong></li>
</ol>
<pre><code class="lang-java">{
    <span class="hljs-keyword">int</span> n2 ; 
}
n2 = <span class="hljs-number">20</span>;
<span class="hljs-comment">// &#x6B64;&#x5904;n2&#x4E0D;&#x80FD;&#x4F7F;&#x7528;,&#x56E0;&#x4E3A;&#x51FA;&#x4E86;&#x58F0;&#x660E;&#x6240;&#x5728;&#x7684;&#x8303;&#x56F4;</span>
</code></pre>
<ol>
<li>&#x53D8;&#x91CF;&#x5FC5;&#x987B;&#x521D;&#x59CB;&#x5316;&#x540E;&#x624D;&#x80FD;&#x4F7F;&#x7528;</li>
</ol>
<pre><code class="lang-java"><span class="hljs-keyword">int</span> n3 = <span class="hljs-number">10</span>;
System.out.print(n3);
<span class="hljs-keyword">int</span> n4;
System.out.print(n4);
<span class="hljs-comment">// &#x7F16;&#x8BD1;&#x9519;&#x8BEF; n4 &#x53EF;&#x80FD;&#x672A;&#x521D;&#x59CB;&#x5316;&#x503C;</span>

<span class="hljs-keyword">int</span> n5 = <span class="hljs-number">10</span>; <span class="hljs-comment">//&#x53EF;&#x4EE5;&#x58F0;&#x660E;&#x65F6;&#x8D4B;&#x503C; &#x4E5F;&#x53EF;&#x4EE5;&#x58F0;&#x660E;&#x540E;&#x8D4B;&#x503C;</span>
<span class="hljs-comment">// &#x4E0A;&#x9762;&#x8FD9;&#x79CD;&#x5199;&#x6CD5;&#x6700;&#x597D;,&#x56E0;&#x4E3A;&#x5B83;&#x628A;&#x58F0;&#x660E;&#x548C;&#x521D;&#x59CB;&#x5316;&#x5408;&#x4F53;&#x4E86;,&#x8FD9;&#x6837;&#x53EF;&#x4EE5;&#x9632;&#x6B62;&#x5FD8;&#x4E86;&#x521D;&#x59CB;&#x5316;</span>
<span class="hljs-keyword">int</span> n6 ; 
n6 = <span class="hljs-number">10</span>; <span class="hljs-comment">// &#x58F0;&#x660E;&#x540E;&#x7684;&#x7B2C;&#x4E00;&#x6B21;&#x8D4B;&#x503C;&#x662F;&#x521D;&#x59CB;&#x5316;&#x8D4B;&#x503C;</span>
n6 = <span class="hljs-number">20</span>; <span class="hljs-comment">// &#x4E4B;&#x540E;&#x7684;&#x8D4B;&#x503C;&#x662F;&#x666E;&#x901A;&#x8D4B;&#x503C;</span>
</code></pre>
<ol>
<li>&#x7A7A;&#x95F4;&#x4E2D;&#x7684;&#x6570;&#x636E;&#x6709;&#x5176;&#x6709;&#x6548;&#x8303;&#x56F4;</li>
</ol>
<pre><code class="lang-java"><span class="hljs-keyword">byte</span> = <span class="hljs-number">200</span>; <span class="hljs-comment">// &#x7F16;&#x8BD1;&#x4F1A;&#x62A5;&#x9519; byte&#x7684;&#x8303;&#x56F4; -128~127</span>
</code></pre>
<pre><code class="lang-java"><span class="hljs-keyword">int</span> n1,n2,n3; <span class="hljs-comment">// &#x867D;&#x7136;&#x53EF;&#x4EE5;,&#x4F46;&#x662F;&#x5F88;&#x4E0D;&#x597D;</span>
</code></pre>
<h3 id="&#x53D8;&#x91CF;&#x8D4B;&#x503C;&#x7684;&#x517C;&#x5BB9;&#x673A;&#x5236;"><em><font color="red">&#x53D8;&#x91CF;&#x8D4B;&#x503C;&#x7684;&#x517C;&#x5BB9;&#x673A;&#x5236;?</font></em></h3>
<p><img src="DAY02 &#x56DE;&#x5FC6;&#x5F0F;&#x7B14;&#x8BB0;.assets/image-20210821101907757.png" alt="image-20210821101907757"></p>
<p><img src="DAY02 &#x56DE;&#x5FC6;&#x5F0F;&#x7B14;&#x8BB0;.assets/image-20210821102107644.png" alt="image-20210821102107644"></p>
<h3 id="&#x4EC0;&#x4E48;&#x662F;&#x53D8;&#x91CF;&#x4EC0;&#x4E48;&#x662F;&#x5E38;&#x91CF;&#x4EC0;&#x4E48;&#x662F;&#x5B57;&#x9762;&#x91CF;">&#x4EC0;&#x4E48;&#x662F;&#x53D8;&#x91CF;?&#x4EC0;&#x4E48;&#x662F;&#x5E38;&#x91CF;?&#x4EC0;&#x4E48;&#x662F;&#x5B57;&#x9762;&#x91CF;?</h3>
<p><strong>&#x53D8;&#x91CF;</strong>&#x5C31;&#x662F;&#x5185;&#x5B58;&#x4E2D;&#x7684;&#x4E00;&#x5757;&#x7A7A;&#x95F4;,&#x5176;&#x4E2D;&#x4FDD;&#x5B58;&#x4E00;&#x4EFD;&#x6570;&#x636E;,&#x5173;&#x952E;&#x662F;&#x8FD9;&#x4E2A;&#x6570;&#x636E;&#x53EF;&#x4EE5;&#x53D8;&#x5316;.</p>
<p><strong>&#x5E38;&#x91CF;</strong>&#x4E5F;&#x662F;&#x7684;&#x4E00;&#x5757;&#x7A7A;&#x95F4;&#xFF0C;&#x91CC;&#x9762;&#x53EF;&#x4EE5;&#x4FDD;&#x5B58;&#x6570;&#x636E;&#xFF0C;&#x5176;&#x4E2D;&#x7684;&#x6570;&#x636E;&#x4E0D;&#x53EF;&#x4EE5;&#x53D8;&#x5316;</p>
<pre><code class="lang-java"><span class="hljs-number">5</span> = <span class="hljs-number">5</span> <span class="hljs-comment">// &#x8FD9;&#x6837;&#x5199;&#x4F1A;&#x51FA;&#x9519;</span>
<span class="hljs-comment">// &#x5DE6;&#x8FB9;&#x8FD9;&#x4E2A;&#x53D8;&#x91CF;&#x8FD8;&#x8FDD;&#x53CD;&#x4E86;&#x6807;&#x8BC6;&#x7B26;&#x89C4;&#x5219;</span>
</code></pre>
<p><strong>&#x5E38;&#x91CF;</strong>&#xFF1A;&#x5305;&#x62EC;&#x5B57;&#x9762;&#x91CF;&#x548C;&#x88AB; final&#x4FEE;&#x9970;&#x7684;&#x91CF;.<code>5</code>,<code>2.8</code>,<code>true</code>,<code>3.22</code>,<code>&quot;abc&quot;</code>,<code>&apos;a&apos;</code>
<strong>&#x5B57;&#x9762;&#x91CF;</strong>&#xFF1A;&#x6240;&#x89C1;&#x53CA;&#x6240;&#x5F97;&#xFF0C;&#x4E5F;&#x79F0;&#x4E3A;&#x53CA;&#x65F6;&#x91CF;&#x6216;&#x7ACB;&#x5373;&#x91CF;</p>
<p><strong>&#x5E38;&#x91CF;&#x53EA;&#x80FD;&#x4F5C;&#x4E3A;&#x53F3;&#x503C;,&#x53EA;&#x6709;&#x53D8;&#x91CF;&#x80FD;&#x505A;&#x5DE6;&#x503C;</strong></p>
<h3 id="&#x6570;&#x503C;&#x5B57;&#x9762;&#x503C;&#x7684;&#x9ED8;&#x8BA4;&#x7C7B;&#x578B;&#x662F;&#x4EC0;&#x4E48;">&#x6570;&#x503C;&#x5B57;&#x9762;&#x503C;&#x7684;&#x9ED8;&#x8BA4;&#x7C7B;&#x578B;&#x662F;&#x4EC0;&#x4E48;?</h3>
<ol>
<li><p>&#x6574;&#x6570;&#x9ED8;&#x8BA4;&#x4E3A;int</p>
</li>
<li><p>&#x6D6E;&#x70B9;&#x6570;&#x9ED8;&#x8BA4;&#x4E3A;double</p>
</li>
</ol>
<pre><code class="lang-java"><span class="hljs-comment">// &#x7F16;&#x8BD1;&#x9519;&#x8BEF; &#x8FC7;&#x5927;&#x7684;&#x6574;&#x6570;</span>
<span class="hljs-keyword">long</span> l1 = <span class="hljs-number">120000000000000</span>;     <span class="hljs-comment">// &#x56E0;&#x4E3A;120000000000000&#x8D85;&#x51FA;int&#x7684;&#x8303;&#x56F4;&#x4E86;</span>
</code></pre>
<pre><code class="lang-java"><span class="hljs-comment">// &#x7F16;&#x8BD1;&#x901A;&#x8FC7;</span>
<span class="hljs-keyword">long</span> l1 = <span class="hljs-number">120000000000000L</span>;        <span class="hljs-comment">// &#x52A0;L&#x6807;&#x8BB0;&#x7B26;,&#x8BA9;&#x7F16;&#x8BD1;&#x5668;&#x7528;long&#x6765;&#x5B58;&#x50A8;&#x8FD9;&#x4E2A;&#x5B57;&#x9762;&#x503C; long&#x578B;&#x5B57;&#x9762;&#x503C;</span>
</code></pre>
<h3 id="&#x7F16;&#x8BD1;&#x5668;&#x5BF9;&#x53D8;&#x91CF;&#x548C;&#x5E38;&#x91CF;&#x5982;&#x4F55;&#x533A;&#x522B;&#x5904;&#x7406;">&#x7F16;&#x8BD1;&#x5668;&#x5BF9;&#x53D8;&#x91CF;&#x548C;&#x5E38;&#x91CF;&#x5982;&#x4F55;&#x533A;&#x522B;&#x5904;&#x7406;?</h3>
<p><strong>&#x7F16;&#x8BD1;&#x5668;&#x5BF9;&#x53D8;&#x91CF;&#x548C;&#x5E38;&#x91CF;&#x7684;&#x533A;&#x522B;&#x5904;&#x7406;&#x53EA;&#x5B58;&#x5728;&#x4E8E;&#x6574;&#x6570;&#x4E2D;</strong></p>
<pre><code class="lang-java"><span class="hljs-comment">// &#x7F16;&#x8BD1;&#x901A;&#x8FC7;</span>
<span class="hljs-keyword">byte</span> b1 = <span class="hljs-number">120</span>;        <span class="hljs-comment">// &#x9ED8;&#x8BA4;&#x4E3A;int&#x7C7B;&#x578B; &#x4E3A;&#x4EC0;&#x4E48;&#x7F16;&#x8BD1;&#x6210;&#x529F;&#x4E86;?</span>
</code></pre>
<pre><code class="lang-java"><span class="hljs-comment">// &#x7F16;&#x8BD1;&#x9519;&#x8BEF;        &#x4E0D;&#x517C;&#x5BB9;&#x7684;&#x7C7B;&#x578B;</span>
<span class="hljs-keyword">int</span> i1 = <span class="hljs-number">120</span>;
<span class="hljs-keyword">byte</span> b1 = i1;
<span class="hljs-comment">// &#x540C;&#x6837;&#x90FD;&#x662F;120 &#x4E3A;&#x4EC0;&#x4E48;&#x7F16;&#x8BD1;&#x4E0D;&#x901A;&#x8FC7;</span>
</code></pre>
<p>&#x6570;&#x503C;&#x5927;&#x5C0F;&#x540C;&#x6837;&#x662F;120,&#x7528;&#x5B57;&#x9762;&#x503C;(&#x5E38;&#x91CF;)&#x8D4B;&#x503C;&#x5C31;&#x7F16;&#x8BD1;&#x901A;&#x8FC7;,&#x7528;&#x53D8;&#x91CF;&#x8D4B;&#x503C;&#x7F16;&#x8BD1;&#x5C31;&#x4E0D;&#x901A;&#x8FC7;.</p>
<p>&#x8FD9;&#x662F;&#x56E0;&#x4E3A;&#x7F16;&#x8BD1;&#x5668;&#x8BA4;&#x4E3A;&#x53D8;&#x91CF;&#x662F;&#x4F1A;&#x53D8;&#x7684;,int&#x578B;&#x53D8;&#x91CF;&#x7684;&#x7A7A;&#x95F4;&#x5927;&#x5C0F;&#x548C;&#x6570;&#x503C;&#x8303;&#x56F4;&#x90FD;&#x662F;&#x8D85;&#x8FC7;byte&#x578B;&#x7684;.<strong>&#x56E0;&#x6B64;&#x5728;&#x7528;&#x53D8;&#x91CF;&#x8D4B;&#x503C;&#x65F6;&#x8981;&#x6C42;&#x7C7B;&#x578B;&#x7684;&#x517C;&#x5BB9;&#x6027;</strong>.&#x800C;&#x7528;&#x5E38;&#x91CF;&#x8D4B;&#x503C;&#x65F6;&#x4E3B;&#x8981;&#x770B;&#x5B57;&#x9762;&#x503C;&#x7684;&#x5927;&#x5C0F;.</p>
<p><strong>&#x6240;&#x4EE5;,&#x975E;long&#x6574;&#x6570;&#x7528;&#x5B57;&#x9762;&#x91CF;&#x76F4;&#x63A5;&#x8D4B;&#x503C;&#x65F6;,&#x53EA;&#x68C0;&#x67E5;&#x6570;&#x503C;&#x8303;&#x56F4;,&#x5FFD;&#x7565;&#x7C7B;&#x578B;&#x68C0;&#x67E5;</strong></p>
<font color="red">**&#x6CE8;&#x610F;&#x8FD9;&#x4E2A;&#x4E4B;&#x524D;&#x63D0;&#x8FC7;&#x7684;&#x95EE;&#x9898;:&#x4EE5;&#x4E0B;&#x7F16;&#x8BD1;&#x4E0D;&#x901A;&#x8FC7;**</font>

<pre><code class="lang-java"><span class="hljs-comment">// &#x7F16;&#x8BD1;&#x9519;&#x8BEF; &#x8FC7;&#x5927;&#x7684;&#x6574;&#x6570;</span>
<span class="hljs-keyword">long</span> l1 = <span class="hljs-number">120000000000000</span>;
</code></pre>
<h3 id="&#x4E3A;&#x4EC0;&#x4E48;&#x6D6E;&#x70B9;&#x6570;&#x6CA1;&#x6709;&#x53D8;&#x91CF;&#x5E38;&#x91CF;&#x533A;&#x522B;&#x5904;&#x7406;">&#x4E3A;&#x4EC0;&#x4E48;&#x6D6E;&#x70B9;&#x6570;&#x6CA1;&#x6709;&#x53D8;&#x91CF;&#x5E38;&#x91CF;&#x533A;&#x522B;&#x5904;&#x7406;</h3>
<blockquote>
 <font color="#134857">**&#x539F;&#x8BDD;: &#x8FD9;&#x4E2A;&#x592A;&#x590D;&#x6742;&#x4E86;&#x6211;&#x5C31;&#x4E0D;&#x8BB2;&#x4E86;,&#x5927;&#x5BB6;&#x767E;&#x5EA6;&#x5427;**</font>

</blockquote>
<p>&#x6574;&#x6570;&#x7684;&#x7A7A;&#x95F4;&#x5168;&#x90E8;&#x7528;&#x6765;&#x8FDB;&#x884C;&#x7F16;&#x7801;</p>
<p>&#x6D6E;&#x70B9;&#x6570;&#x7684;&#x7A7A;&#x95F4;&#x5219;&#x5206;&#x4E3A;,<strong>&#x6709;&#x6548;&#x6570;&#x5B57;&#x4F4D;</strong>&#x548C;<strong>&#x6307;&#x6570;&#x4F4D;</strong>.&#x6240;&#x4EE5;&#x6D6E;&#x70B9;&#x6570;&#x7684;&#x5185;&#x5B58;&#x6709;&#x7ED3;&#x6784;.</p>
<p>&#x56E0;&#x6B64;</p>
<pre><code class="lang-java"><span class="hljs-comment">// &#x7F16;&#x8BD1;&#x4E0D;&#x901A;&#x8FC7; &#x4E0D;&#x517C;&#x5BB9;&#x7684;&#x7C7B;&#x578B;: &#x4ECE;double&#x8F6C;&#x6362;&#x5230;float&#x53EF;&#x80FD;&#x4F1A;&#x6709;&#x635F;&#x5931;</span>
<span class="hljs-keyword">float</span> f1 = <span class="hljs-number">1.8</span>;
</code></pre>
<p>&#x5373;&#x4F7F;&#x662F;&#x5B57;&#x9762;&#x503C;&#x8D4B;&#x503C;,&#x4E5F;&#x4F1A;&#x6709;&#x7C7B;&#x578B;&#x68C0;&#x67E5;&#x8FD9;&#x4E00;&#x5173;. &#x5FC5;&#x987B;</p>
<pre><code class="lang-java"><span class="hljs-comment">//&#x7F16;&#x8BD1;&#x901A;&#x8FC7;</span>
<span class="hljs-keyword">float</span> f1 = <span class="hljs-number">1.8F</span>;   <span class="hljs-comment">// F&#x662F;&#x4E00;&#x4E2A;&#x6807;&#x8BB0;,&#x63D0;&#x9192;&#x7F16;&#x8BD1;&#x5668;,&#x8BF7;&#x628A;&#x8FD9;&#x4E2A;&#x6D6E;&#x70B9;&#x6570;&#x5B57;&#x9762;&#x91CF;&#x4F7F;&#x7528;float4&#x5B57;&#x8282;&#x7A7A;&#x95F4;&#x6765;&#x4FDD;&#x5B58;</span>
</code></pre>
<pre><code class="lang-java"><span class="hljs-keyword">float</span> f1 = (<span class="hljs-keyword">float</span>)<span class="hljs-number">2.8</span>;l
<span class="hljs-keyword">float</span> f2 = <span class="hljs-number">2.8F</span>;  <span class="hljs-comment">// F&#x662F;&#x4E00;&#x4E2A;&#x6807;&#x8BB0;,&#x63D0;&#x9192;&#x7F16;&#x8BD1;&#x5668;,&#x8BF7;&#x628A;&#x8FD9;&#x4E2A;&#x6D6E;&#x70B9;&#x6570;&#x5B57;&#x9762;&#x91CF;&#x4F7F;&#x7528;float4&#x5B57;&#x8282;&#x7A7A;&#x95F4;&#x6765;&#x4FDD;&#x5B58;</span>

<span class="hljs-keyword">long</span> l1 = <span class="hljs-number">5000000000</span>; <span class="hljs-comment">// 50&#x4EBF;,&#x7F16;&#x8BD1;&#x9519;&#x8BEF;,&#x8FC7;&#x5927;&#x7684;&#x6574;&#x6570;</span>
<span class="hljs-keyword">long</span> l2 = <span class="hljs-number">5000000000L</span>; <span class="hljs-comment">// &#x4F7F;&#x7528;long&#x578B;&#x7684;&#x5B57;&#x9762;&#x503C;.</span>
</code></pre>
<h3 id="&#x6570;&#x503C;&#x8303;&#x56F4;&#x4ECE;&#x5C0F;&#x5230;&#x5927;&#x7684;&#x6392;&#x5E8F;&#x662F;&#x4EC0;&#x4E48;">&#x6570;&#x503C;&#x8303;&#x56F4;&#x4ECE;&#x5C0F;&#x5230;&#x5927;&#x7684;&#x6392;&#x5E8F;&#x662F;&#x4EC0;&#x4E48;?</h3>
<p>&#x5404;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x6309;&#x6570;&#x503C;&#x8303;&#x56F4;&#x4ECE;&#x5C0F;&#x5230;&#x5927;&#x7684;&#x6392;&#x5E8F;&#x662F;</p>
<p>byte &lt; short &lt; int &lt;long &lt; float &lt; double</p>
<h3 id="&#x81EA;&#x52A8;&#x7C7B;&#x578B;&#x63D0;&#x5347;&#x7684;&#x4E3B;&#x8981;&#x89C4;&#x5219;&#x6570;&#x503C;&#x578B;">&#x81EA;&#x52A8;&#x7C7B;&#x578B;&#x63D0;&#x5347;&#x7684;&#x4E3B;&#x8981;&#x89C4;&#x5219;(&#x6570;&#x503C;&#x578B;)?</h3>
<ol>
<li>&#x975E;long&#x6574;&#x6570;&#x4F5C;&#x8FD0;&#x7B97;,&#x7ED3;&#x679C;&#x4E00;&#x5B9A;&#x662F;int&#x578B;</li>
<li>&#x4E0D;&#x540C;&#x7C7B;&#x578B;&#x7684;&#x6570;&#x636E;&#x6DF7;&#x5408;&#x8FD0;&#x7B97;&#x65F6;,&#x7ED3;&#x679C;&#x7C7B;&#x578B;&#x603B;&#x662F;&#x6570;&#x636E;&#x4E2D;&#x8303;&#x56F4;&#x6700;&#x5927;&#x7684;&#x90A3;&#x4E2A;&#x7C7B;&#x578B;&#x7684;&#x7C7B;&#x578B;.</li>
</ol>
<p><img src="DAY02 &#x56DE;&#x5FC6;&#x5F0F;&#x7B14;&#x8BB0;.assets/image-20210822112127059.png" alt="image-20210822112127059"></p>
<h3 id="&#x5F3A;&#x5236;&#x7C7B;&#x578B;&#x8F6C;&#x6362;">&#x5F3A;&#x5236;&#x7C7B;&#x578B;&#x8F6C;&#x6362;</h3>
<p>&#x5F3A;&#x5236;&#x7C7B;&#x578B;&#x8F6C;&#x6362;&#x662F;&#x622A;&#x53BB;&#x9AD8;&#x4F4D;</p>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Test</span> </span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
        <span class="hljs-keyword">char</span> c1 = <span class="hljs-string">&apos;&#x54C7;&apos;</span>;
        <span class="hljs-keyword">byte</span> b1 = <span class="hljs-number">123</span>;
        <span class="hljs-keyword">int</span> i1 = c1 + b1;
        System.out.println(<span class="hljs-string">&quot;i1=&quot;</span>+i1);
        <span class="hljs-keyword">byte</span> b2  = (<span class="hljs-keyword">byte</span>)i1;
        System.out.println(<span class="hljs-string">&quot;b2=&quot;</span>+b2);
    }
}
<span class="hljs-comment">/*out
i1=21826
b2=66
*/</span>
</code></pre>
<p>21826&#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x8868;&#x793A;     0101 0101 0100 0010</p>
<p>66&#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x8868;&#x793A;                               0100 0010</p>
<p>21826&#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x524D;&#x9762;&#x88AB;&#x622A;&#x65AD;&#x4E86;,&#x4ECE;&#x800C;&#x4ECE;21826&#x53D8;&#x6210;&#x4E86;66</p>
<p><strong>&#x6D6E;&#x70B9;&#x6570;&#x5F3A;&#x8F6C;&#x6574;&#x6570;&#x5219;&#x662F;&#x53EA;&#x4FDD;&#x7559;&#x4E86;&#x6574;&#x6570;&#x90E8;&#x5206;</strong></p>
<font color="red">**&#x6D6E;&#x70B9;&#x6570;&#x5F3A;&#x8F6C;&#x6574;&#x6570;&#x6D89;&#x53CA;&#x8FD0;&#x7B97;,&#x6BD4;&#x8F83;&#x590D;&#x6742;,&#x800C;&#x4E14;&#x6D6E;&#x70B9;&#x6570;&#x7684;&#x4E8C;&#x8FDB;&#x5236;&#x8868;&#x8FBE;&#x65E0;&#x6CD5;&#x76F4;&#x63A5;&#x8F93;&#x51FA;**</font>

<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Test</span> </span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
        <span class="hljs-keyword">float</span> f1 = <span class="hljs-number">2.8F</span>;
        <span class="hljs-keyword">int</span> i1 = (<span class="hljs-keyword">int</span>)f1;
        System.out.println(<span class="hljs-string">&quot;f1=&quot;</span>+f1);
        System.out.println(<span class="hljs-string">&quot;i1=&quot;</span>+i1);
    }
}
<span class="hljs-comment">/*out
f1=2.8
i1=2
*/</span>
</code></pre>
<p>&#x5E03;&#x5C14;&#x578B;&#x65E0;&#x6CD5;&#x5F3A;&#x8F6C;&#x4E3A;&#x5176;&#x5B83;&#x7C7B;&#x578B;,&#x5E03;&#x5C14;&#x578B;&#x53EA;&#x80FD;&#x53D6;&#x503C;&#x4E3A;[ture&#x6216;false]</p>
<p><img src="DAY02 &#x56DE;&#x5FC6;&#x5F0F;&#x7B14;&#x8BB0;.assets/image-20210821113530930.png" alt="image-20210821113530930"></p>
<h2 id="&#x5B57;&#x7B26;&#x4E0E;&#x5B57;&#x7B26;&#x4E32;">&#x5B57;&#x7B26;&#x4E0E;&#x5B57;&#x7B26;&#x4E32;</h2>
<h3 id="&#x5B57;&#x7B26;&#x578B;&#x5B58;&#x50A8;&#x7684;&#x7A76;&#x7ADF;&#x662F;&#x4EC0;&#x4E48;">&#x5B57;&#x7B26;&#x578B;&#x5B58;&#x50A8;&#x7684;&#x7A76;&#x7ADF;&#x662F;&#x4EC0;&#x4E48;?</h3>
<p>char&#x4E2D;&#x4FDD;&#x5B58;&#x7684;&#x662F;&#x7801;&#x503C;(&#x6574;&#x6570;).</p>
<p><strong>&#x5982;&#x56FE;&#x6240;&#x793A;</strong></p>
<p><img src="DAY02 &#x56DE;&#x5FC6;&#x5F0F;&#x7B14;&#x8BB0;.assets/image-20210821105910193.png" alt="image-20210821105910193"></p>
<p><img src="DAY02 &#x56DE;&#x5FC6;&#x5F0F;&#x7B14;&#x8BB0;.assets/image-20210821110048156.png" alt="image-20210821110048156"></p>
<p>char &#x7C7B;&#x578B;&#x4E5F;&#x53EF;&#x4EE5;&#x76F4;&#x63A5;&#x7528;&#x7801;&#x503C;(&#x6CE8;&#x610F;&#x662F;int&#x578B;)&#x8D4B;&#x503C;</p>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Test</span> </span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
        <span class="hljs-keyword">char</span> ch1 = <span class="hljs-number">27432</span>;
        System.out.println(ch1);
    }
}
<span class="hljs-comment">/*out
&#x6B28;
*/</span>
</code></pre>
<p>char&#x578B;&#x53D8;&#x91CF;&#x7684;&#x672C;&#x8D28;&#x662F;&#x6574;&#x6570;&#x3002;char&#x53EA;&#x6709;&#x6B63;&#x6570;&#xFF0C;&#x6CA1;&#x6709;&#x8D1F;&#x6570;&#xFF0C;&#x6240;&#x4EE5;&#x5B83;&#x4E0D;&#x53EF;&#x4EE5;&#x548C; short,byte&#x76F4;&#x63A5;&#x517C;&#x5BB9;</p>
<pre><code class="lang-java"><span class="hljs-comment">// &#x7F16;&#x8BD1;&#x9519;&#x8BEF; &#x4E0D;&#x517C;&#x5BB9;&#x7684;&#x7C7B;&#x578B;: &#x4ECE;byte&#x8F6C;&#x6362;&#x5230;char&#x53EF;&#x80FD;&#x4F1A;&#x6709;&#x635F;&#x5931;</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Test</span> </span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
        <span class="hljs-keyword">byte</span> b1 = <span class="hljs-number">112</span>;
        <span class="hljs-keyword">char</span> ch1 = b1;
    }
}
</code></pre>
<pre><code class="lang-java"><span class="hljs-comment">// &#x7F16;&#x8BD1;&#x9519;&#x8BEF;  &#x4E0D;&#x517C;&#x5BB9;&#x7684;&#x7C7B;&#x578B;: &#x4ECE;char&#x8F6C;&#x6362;&#x5230;byte&#x53EF;&#x80FD;&#x4F1A;&#x6709;&#x635F;&#x5931;</span>
<span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Test</span> </span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
        <span class="hljs-keyword">byte</span> b1 ;
        <span class="hljs-keyword">char</span> ch2 = <span class="hljs-number">12</span>;
        b1 = ch2;
    }
}
</code></pre>
<p>&#x6709;&#x4E9B;&#x5B57;&#x7B26;&#x65E0;&#x6CD5;&#x7528;&#x5B57;&#x9762;&#x91CF;&#x6765;&#x63CF;&#x8FF0;&#x6BD4;&#x5982; &#x56DE;&#x8F66;,&#x6362;&#x884C;&#x7B49;&#x63A7;&#x5236;&#x7B26;</p>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Test</span> </span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
        String s1 = <span class="hljs-string">&quot;hello \n world&quot;</span>;
        System.out.println(s1);
    }
}
<span class="hljs-comment">/*out
hello 
 world
*/</span>
</code></pre>
<p><a href="#b&#x95EE;&#x9898;"><em>&#x8BB2;&#x8BFE;&#x65F6;&#x9047;&#x5230;&#x4E00;&#x4E2A;\b&#x95EE;&#x9898;&#x70B9;&#x51FB;&#x53EF;&#x67E5;&#x770B;</em></a></p>
<h3 id="&#x5B57;&#x7B26;&#x4E32;&#x5F15;&#x7528;&#x7C7B;&#x578B;">&#x5B57;&#x7B26;&#x4E32;(&#x5F15;&#x7528;&#x7C7B;&#x578B;)</h3>
<p><strong>&#x5B57;&#x7B26;&#x4E32;&#x4E0D;&#x5C5E;&#x4E8E;8&#x79CD;&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;.</strong>&#x5B83;&#x662F;&#x5F15;&#x7528;&#x7C7B;&#x578B;</p>
<pre><code class="lang-java">String s1 = <span class="hljs-string">&quot;abc&quot;</span>;
<span class="hljs-comment">// s1&#x79CD;&#x4FDD;&#x5B58;&#x7684;&#x662F;&quot;abc&quot;&#x5728;&#x5185;&#x5B58;&#x4E2D;&#x7684;&#x5730;&#x5740;&#x503C;,s1&#x6307;&#x5411;&#x4E86;&#x5BF9;&#x8C61;,&#x6240;&#x4EE5;s1&#x4E5F;&#x79F0;&#x4E3A;&#x6307;&#x9488;</span>
String s2 = <span class="hljs-string">&quot;yyy&quot;</span>;
String s3 = <span class="hljs-keyword">null</span>;
String s4 = <span class="hljs-string">&quot;&quot;</span> <span class="hljs-comment">// &#x7A7A;&#x4E32;</span>
<span class="hljs-comment">//&#x5B57;&#x7B26;&#x4E32;&#x5185;&#x5BB9;&#x4E0D;&#x53EF;&#x6539;&#x53D8;&#xFF0C;&#x4F46;&#x662F;&#x53EF;&#x4EE5;&#x548C;&#x4EFB;&#x610F;&#x6570;&#x636E;&#x7528;+&#x4F5C;&#x62FC;&#x63A5;&#xFF0C;&#x62FC;&#x63A5;&#x7684;&#x7ED3;&#x679C;&#x603B;&#x662F;&#x4F1A;&#x4EA7;&#x751F;&#x4E00;&#x4E2A;&#x65B0;&#x7684;&#x5B57;&#x7B26;&#x4E32;</span>
s1 = s1 + <span class="hljs-number">100</span>; <span class="hljs-comment">//&quot;abc100&quot;</span>
</code></pre>
<p><a href="#&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x548C;&#x57FA;&#x672C;&#x7C7B;&#x578B;&#x7684;&#x533A;&#x522B;">&#x70B9;&#x51FB;&#x56DE;&#x987E;&#x57FA;&#x672C;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x548C;&#x5F15;&#x7528;&#x7C7B;&#x578B;&#x7684;&#x533A;&#x522B;</a></p>
<p><img src="DAY02 &#x56DE;&#x5FC6;&#x5F0F;&#x7B14;&#x8BB0;.assets/image-20210822090105655.png" alt="image-20210822090105655"></p>
<h3 id="&#x5B57;&#x7B26;&#x4E32;&#x8F6C;&#x6362;">&#x5B57;&#x7B26;&#x4E32;&#x8F6C;&#x6362;</h3>
<p><img src="DAY02 &#x56DE;&#x5FC6;&#x5F0F;&#x7B14;&#x8BB0;.assets/image-20210821141908232.png" alt="image-20210821141908232"></p>
<pre><code class="lang-java"><span class="hljs-comment">// &#x8FD9;&#x4E2A;&#x65B9;&#x6CD5;&#x53EF;&#x4EE5;&#x5C06;&#x5B57;&#x7B26;&#x4E32;&#x8F6C;&#x4E3A;&#x5B57;&#x9762;&#x610F;&#x4E49;&#x7684;int&#x578B;&#x6574;&#x6570;</span>
Interger.parseInt(s8);
</code></pre>
<h2 id="&#x8FDB;&#x5236;">&#x8FDB;&#x5236;</h2>
<h3 id="&#x6743;&#x503C;&#x662F;&#x4EC0;&#x4E48;&#x5404;&#x8FDB;&#x5236;&#x5982;&#x4F55;&#x8868;&#x793A;">&#x6743;&#x503C;&#x662F;&#x4EC0;&#x4E48;?&#x5404;&#x8FDB;&#x5236;&#x5982;&#x4F55;&#x8868;&#x793A;?</h3>
<p>&#x8FD9;&#x91CC;&#x7684;&#x6743;&#x503C;&#x662F;&#x4F4D;&#x6743;.&#x662F;&#x4EE5;&#x8FDB;&#x5236;&#x4E3A;&#x57FA;&#x6570;&#x7684;n-1&#x6B21;&#x5E42; </p>
<p>n=&#x4F4D;&#x6570;</p>
<table>
<thead>
<tr>
<th>&#x8FDB;&#x5236;</th>
<th>&#x6743;&#x6570;</th>
<th>&#x8BF4;&#x660E;</th>
<th>&#x8868;&#x793A;</th>
</tr>
</thead>
<tbody>
<tr>
<td>&#x5341;&#x8FDB;&#x5236;</td>
<td>10^(n-1)</td>
<td>&#x6CA1;&#x6709;10,&#x9022;10&#x8FDB;1</td>
<td>&#x76F4;&#x63A5;&#x8868;&#x793A;</td>
</tr>
<tr>
<td>&#x4E8C;&#x8FDB;&#x5236;</td>
<td>2^(n-1)</td>
<td>&#x6CA1;&#x6709;2,&#x9022;2&#x8FDB;1</td>
<td>0b&#x5F00;&#x5934;</td>
</tr>
<tr>
<td>&#x5341;&#x516D;&#x8FDB;&#x5236;</td>
<td>2^(n-1)</td>
<td>&#x6CA1;&#x6709;16,&#x9022;16&#x8FDB;1</td>
<td>0x&#x5F00;&#x5934;</td>
</tr>
<tr>
<td>&#x516B;&#x8FDB;&#x5236;</td>
<td>8^(n-1)</td>
<td>&#x6CA1;&#x6709;8,&#x9022;8&#x8FDB;1</td>
<td>0&#x5F00;&#x5934;</td>
</tr>
</tbody>
</table>
<pre><code class="lang-markdown">3884371 = 
3 * 10 ^ 6 +
2 * 10 ^ 5 +
8 * 10 ^ 4 +
4 * 10 ^ 3 +
3 * 10 ^ 2 +
7 * 10 ^ 1 +
1 * 10 ^ 0
</code></pre>
<h3 id="&#x7814;&#x7A76;16&#x8FDB;&#x5236;&#x7684;&#x610F;&#x4E49;&#x662F;&#x4EC0;&#x4E48;">&#x7814;&#x7A76;16&#x8FDB;&#x5236;&#x7684;&#x610F;&#x4E49;&#x662F;&#x4EC0;&#x4E48;?</h3>
<p><strong>&#x4E00;&#x4E2A;16&#x8FDB;&#x5236;&#x6570;&#x521A;&#x597D;&#x662F;4&#x4E2A;&#x6BD4;&#x7279;,&#x8FD9;&#x6837;&#x6211;&#x7528;&#x4E24;&#x4F4D;16&#x8FDB;&#x5236;&#x6570;&#x5C31;&#x80FD;&#x5F88;&#x597D;&#x5730;&#x63CF;&#x8FF0;&#x4E00;&#x4E2A;&#x5B57;&#x8282;</strong></p>
<p><code>0x5c =&gt; 0101 1100</code></p>
<p>&#x5B66;&#x4E60;&#x4E8C;&#x8FDB;&#x5236;&#x4E00;&#x5B9A;&#x8981;&#x501F;&#x52A9;16&#x8FDB;&#x5236;&#x7684;&#x6865;&#x6881;</p>
<p><code>0XE25B =&gt; 1110 0010 0101 1011</code>
<code>0101 0101 1100 1011 =&gt; 0x55CB</code></p>
<p>&#x501F;&#x52A9;<strong>8421</strong>&#x6CD5; 16&#x8FDB;&#x5236;&#x8F6C;2&#x8FDB;&#x5236; &#x53EF;&#x4EE5;&#x673A;&#x68B0;&#x5730;&#x4E92;&#x8F6C;,&#x5341;&#x5206;&#x65B9;&#x4FBF;</p>
<table>
<thead>
<tr>
<th>10&#x8FDB;&#x5236;</th>
<th>2&#x8FDB;&#x5236;</th>
<th>16&#x8FDB;&#x5236;</th>
</tr>
</thead>
<tbody>
<tr>
<td>0</td>
<td>0000</td>
<td>0</td>
</tr>
<tr>
<td><font color="red">1</font></td>
<td><font color="red">0001</font></td>
<td><font color="red">1</font></td>
</tr>
<tr>
<td><font color="red">2</font></td>
<td><font color="red">0010</font></td>
<td><font color="red">2</font></td>
</tr>
<tr>
<td>3</td>
<td>0011</td>
<td>3</td>
</tr>
<tr>
<td><font color="red">4</font></td>
<td><font color="red">0100</font></td>
<td><font color="red">4</font></td>
</tr>
<tr>
<td>5</td>
<td>0101</td>
<td>5</td>
</tr>
<tr>
<td>6</td>
<td>0110</td>
<td>6</td>
</tr>
<tr>
<td>7</td>
<td>0111</td>
<td>7</td>
</tr>
<tr>
<td><font color="red">8</font></td>
<td><font color="red">1000</font></td>
<td><font color="red">8</font></td>
</tr>
<tr>
<td>9</td>
<td>1001</td>
<td>9</td>
</tr>
<tr>
<td>10</td>
<td>1010</td>
<td>A</td>
</tr>
<tr>
<td>11</td>
<td>1011</td>
<td>B</td>
</tr>
<tr>
<td>12</td>
<td>1100</td>
<td>C</td>
</tr>
<tr>
<td>13</td>
<td>1101</td>
<td>D</td>
</tr>
<tr>
<td>14</td>
<td>1110</td>
<td>E</td>
</tr>
<tr>
<td>15</td>
<td>1111</td>
<td>F</td>
</tr>
</tbody>
</table>
<h3 id="8421&#x6CD5;&#x5B9E;&#x73B0;16&#x8FDB;&#x5236;&#x4E0E;2&#x8FDB;&#x5236;&#x4E92;&#x8F6C;">8421&#x6CD5;&#x5B9E;&#x73B0;16&#x8FDB;&#x5236;&#x4E0E;2&#x8FDB;&#x5236;&#x4E92;&#x8F6C;</h3>
<p>2&#x8FDB;&#x5236; &#x8F6C; 16&#x8FDB;&#x5236;&#x7684;<strong>&#x4F8B;&#x5B50;</strong></p>
<pre><code>1101 
&#x7531;
1000 + 
0100 +
0001
&#x7EC4;&#x6210;
1000 &#x4E3A; 8
0100 &#x4E3A; 4
0001 &#x4E3A; 1
&#x6545;&#x4E3A;16&#x8FDB;&#x5236;&#x6570; 8 + 4 + 1 = 13 =&gt; D
</code></pre><p>16&#x8FDB;&#x5236; &#x8F6C; 2&#x8FDB;&#x5236;&#x7684;<strong>&#x4F8B;&#x5B50;</strong></p>
<pre><code>0x6B
&#x5148;&#x770B;&#x7B2C;&#x4E00;&#x4F4D;6
&#x5728;8421&#x4E2D;&#x5B83;&#x4EC5;&#x53EF;&#x7531; 4 &#x548C; 2 &#x76F8;&#x52A0;&#x6784;&#x6210;
&#x5728;&#x4E8C;&#x8FDB;&#x5236;&#x4E2D;&#x5219;&#x662F;
0100 &#x4E0E; 0010 &#x76F8;&#x52A0; &#x4E8E;&#x662F; 
0100 +
0010 =
0110
B &#x5728; 8421 &#x4E2D;&#x4EC5;&#x53EF;&#x7531; 8 &#x4E0E; 2 &#x4E0E; 1 &#x76F8;&#x52A0;&#x6784;&#x6210;
&#x5728;&#x4E8C;&#x8FDB;&#x5236;&#x4E2D;&#x5219;&#x662F;
1000 + 0010 + 0001 = 1011
&#x4E8E;&#x662F; 0x6B =&gt; 0110 1011
</code></pre><h3 id="&#x4EC0;&#x4E48;&#x662F;&#x8865;&#x7801;&#x4E86;&#x89E3;">&#x4EC0;&#x4E48;&#x662F;&#x8865;&#x7801;(&#x4E86;&#x89E3;)?</h3>
<p>&#x6B63;&#x6570;&#x7684;&#x8865;&#x7801;&#x662F;&#x81EA;&#x8EAB;</p>
<p>&#x8D1F;&#x6570;&#x7684;&#x8865;&#x7801;&#x662F;&#x5B83;&#x7684;&#x76F8;&#x53CD;&#x6570;&#x5168;&#x90E8;&#x53D6;&#x53CD;+1&#x5F97;&#x5230;</p>
<p><strong>&#x5982;&#x679C;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x4E3A;byte</strong>(&#x4EC5;&#x7531;&#x4E00;&#x4E2A;&#x5B57;&#x8282;&#x6784;&#x6210;)</p>
<p><strong>&#x90A3;&#x4E48;</strong>1110 0111 &#x8FD9;&#x4E2A;&#x6570;&#x5C31;&#x662F;&#x4E00;&#x4E2A;&#x8D1F;&#x6570;.<strong>&#x56E0;&#x4E3A;&#x5728;&#x8FD9;&#x4E2A;1&#x5B57;&#x8282;&#x7684;&#x5185;&#x5B58;&#x7A7A;&#x95F4;&#x4E2D;,&#x7B2C;&#x4E00;&#x4F4D;&#x4E3A;&#x7B26;&#x53F7;&#x4F4D;</strong></p>
<p>1110 0111 &#x51CF;&#x53BB; 1 =&gt; 1110 0110</p>
<p>&#x53D6;&#x53CD; =&gt; 0001 1001 =&gt; 0x19 =&gt; 25</p>
<p>&#x6240;&#x4EE5; 1110 0111 &#x662F; -25 &#x7684;&#x8865;&#x7801;</p>
<p>&#x90A3;&#x4E48; 0011 0111 &#x5219;&#x662F;&#x4E00;&#x4E2A;&#x6B63;&#x6570;</p>
<p>0x37 =&gt; 55</p>
<p>&#x6240;&#x4EE5; 0011 0111 &#x662F; +55</p>
<h3 id="&#x8865;&#x7801;&#x548C;-1&#x5206;&#x522B;&#x89E3;&#x51B3;&#x4E86;&#x4EC0;&#x4E48;&#x95EE;&#x9898;"><strong>&#x8865;&#x7801;&#x548C;-1&#x5206;&#x522B;&#x89E3;&#x51B3;&#x4E86;&#x4EC0;&#x4E48;&#x95EE;&#x9898;</strong></h3>
<p><strong>&#x8865;&#x7801;</strong></p>
<p>&#x56E0;&#x4E3A;&#x8BA1;&#x7B97;&#x673A;&#x53EA;&#x4F1A;&#x52A0;&#x6CD5;, &#x4E3A;&#x4E86;&#x5B9E;&#x73B0;&#x51CF;&#x6CD5;, &#x5FC5;&#x987B;&#x91C7;&#x53D6;<strong>&#x52A0;&#x8D1F;&#x6570;</strong>&#x7684;&#x65B9;&#x5F0F;.<strong>&#x56E0;&#x6B64;&#x9700;&#x8981;&#x4E3A;&#x6B64;&#x91CD;&#x65B0;&#x8BBE;&#x8BA1;&#x7F16;&#x7801;, &#x6545;&#x5F15;&#x5165;&#x7B26;&#x53F7;&#x4F4D;&#x548C;&#x8865;&#x7801;</strong></p>
<p><strong>-1</strong></p>
<p>&#x4EC5;&#x4EC5;&#x5F15;&#x5165;&#x7B26;&#x53F7;&#x4F4D;&#x540E; 1000 0000 &#x548C; 0000 0000 &#x662F; +0 &#x8FD8;&#x662F; -0 &#x5C31;&#x4F1A;&#x5BFC;&#x81F4;&#x8BA1;&#x7B97;&#x51B2;&#x7A81;</p>
<p>&#x56E0;&#x6B64;&#x8BA9;&#x8D1F;&#x6570; &#x53D6;&#x8865;&#x7801;&#x540E;+1 &#x628A;&#x7F16;&#x7801;&#x8BA9;&#x5F00;.</p>
<p>&#x5F15;&#x5165;&#x8865;&#x7801;,&#x6211;&#x4EEC;&#x5C31;&#x5B9E;&#x73B0;&#x8BA9;1000 0000&#x53BB;&#x8868;&#x793A;&#x8D1F;&#x503C;&#x6700;&#x5C0F;&#x4E86; &#x4E5F;&#x5C31;&#x662F;-128</p>
<h3 id="byte&#x7684;&#x6700;&#x5927;&#x503C;&#x4E3A;&#x4EC0;&#x4E48;&#x662F;127">byte&#x7684;&#x6700;&#x5927;&#x503C;&#x4E3A;&#x4EC0;&#x4E48;&#x662F;127?</h3>
<p>0111 1111 =&gt; 0x7F =&gt; 7*16 + 15 =&gt; 127</p>
<p>1111 1111 &#x662F;&#x8D1F;&#x6570;</p>
<p>-1 =&gt; 1111 1110 &#x53D6;&#x53CD; =&gt; 0000 0001 =&gt; -1</p>
<p>1000 0000 &#x662F;&#x8D1F;&#x6570;</p>
<p>-1 =&gt; 0111 1111 =&gt; &#x53D6;&#x53CD; =&gt; 1000 0000 =&gt; 0x80 =&gt; 16*8 =-128</p>
<p><strong>1111 1111 &#x548C; 1000 0000 &#x4E4B;&#x95F4;&#x6709;&#x4EC0;&#x4E48;&#x8054;&#x7CFB;?</strong></p>
<p>1111 1111 = -1     &#x662F;&#x8D1F;&#x6570;&#x7684;&#x6700;&#x5927;&#x503C;</p>
<p>1000 0000 = -128 &#x662F;&#x8D1F;&#x6570;&#x6700;&#x5C0F;&#x503C;</p>
<p>short &#x548C; int &#x548C; long &#x53EA;&#x4E0D;&#x8FC7;&#x662F;&#x5B57;&#x8282;&#x591A;&#x4E00;&#x4E9B; &#x539F;&#x7406;&#x4E00;&#x6837;</p>
<p><strong>short&#x578B;&#x6700;&#x5927;&#x503C;</strong></p>
<p>0111 1111 1111 1111 =&gt; 0x7FFFF =&gt; 32767</p>
<p><strong>short&#x578B;&#x6700;&#x5C0F;&#x503C;</strong></p>
<p>1000 0000 0000 0000 =&gt; 0x8000 =&gt; -32768</p>
<p><strong>&#x5B9E;&#x8DF5;</strong></p>
<p>byte&#x7C7B;&#x578B;</p>
<pre><code class="lang-java"><span class="hljs-keyword">byte</span> bMax = <span class="hljs-number">0x7F</span>;
<span class="hljs-keyword">byte</span> bMin = (<span class="hljs-keyword">byte</span>)<span class="hljs-number">0x80</span>; <span class="hljs-comment">// 0x80 =&gt; 1000 0000 &#x4F46;&#x662F;&#x9ED8;&#x8BA4;&#x662F;int </span>
<span class="hljs-comment">//&#x5176;&#x5B9E;&#x662F;0000 0000 0000 0000 0000 0000 1000 0000 &#x6240;&#x4EE5;1&#x4E0D;&#x5728;&#x7B26;&#x53F7;&#x4F4D;&#x4E0A; &#x6545;&#x5F3A;&#x8F6C;</span>
</code></pre>
<p>long&#x7C7B;&#x578B;</p>
<pre><code class="lang-java"><span class="hljs-keyword">long</span> lMin = Ox8000000000000000L;
<span class="hljs-keyword">long</span> lMax = OX7FFFFFFFFFFFFFFFL; <span class="hljs-comment">// &#x6CE8;&#x610F;&#x8FD9;&#x4E2A;L&#x6807;&#x8BB0;&#x7B26;</span>
</code></pre>
<p>char&#x548C;short&#x7C7B;&#x578B;</p>
<pre><code class="lang-java"><span class="hljs-keyword">char</span> cMax = <span class="hljs-number">0xFFFF</span>; <span class="hljs-comment">//1111 1111 1111 1111</span>
<span class="hljs-comment">// char&#x662F;&#x6CA1;&#x6709;&#x7B26;&#x53F7;&#x4F4D;&#x7684; &#x6240;&#x4EE5;&#x8FD9;&#x4E2A;&#x6253;&#x5370;(int)cMax&#x5C31;&#x662F;65535</span>
<span class="hljs-keyword">short</span> s = (<span class="hljs-keyword">short</span>)cMax; <span class="hljs-comment">//1111 1111 1111 1111</span>
<span class="hljs-comment">//&#x6362;&#x5230;short&#x5C31;&#x6709;&#x7B26;&#x53F7;&#x4F4D;&#x4E86;,&#x8FD9;&#x4E2A;&#x65F6;&#x5019;&#x5B83;&#x662F;&#x8D1F;&#x6570; &#x4E3A;-1</span>
</code></pre>
<h2 id="&#x989D;&#x5916;&#x8865;&#x5145;">&#x989D;&#x5916;&#x8865;&#x5145;</h2>
<h3 id="b&#x95EE;&#x9898;">\b&#x95EE;&#x9898;</h3>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">Test</span> </span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span> </span>{
        System.out.println(<span class="hljs-string">&quot;abcdefg\b\b\b\byyy&quot;</span>);
    }
}
<span class="hljs-comment">/*out
abcyyyg
*/</span>
</code></pre>
<p><img src="DAY02 &#x56DE;&#x5FC6;&#x5F0F;&#x7B14;&#x8BB0;.assets/image-20210822101509041.png" alt="image-20210822101509041"></p>
<h2 id="&#x7EC3;&#x4E60;">&#x7EC3;&#x4E60;</h2>
<h3 id="&#x7EC3;&#x4E60;1-&#x6253;&#x5370;&#x81EA;&#x5DF1;&#x7684;&#x59D3;&#x540D;&#x548C;&#x76F8;&#x5E94;&#x7801;&#x503C;">&#x7EC3;&#x4E60;1 &#x6253;&#x5370;&#x81EA;&#x5DF1;&#x7684;&#x59D3;&#x540D;&#x548C;&#x76F8;&#x5E94;&#x7801;&#x503C;</h3>
<pre><code class="lang-java"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">PrintCode</span></span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] agrs)</span></span>{
        <span class="hljs-keyword">char</span> ch1 = <span class="hljs-string">&apos;&#x9093;&apos;</span>;
        <span class="hljs-keyword">char</span> ch2 = <span class="hljs-string">&apos;&#x5B50;&apos;</span>;
        <span class="hljs-keyword">char</span> ch3 = <span class="hljs-string">&apos;&#x7426;&apos;</span>;
        System.out.println(<span class="hljs-string">&quot;&#x9093;&quot;</span>+(<span class="hljs-keyword">int</span>)ch1);
        System.out.println(<span class="hljs-string">&quot;&#x5B50;&quot;</span>+(<span class="hljs-keyword">int</span>)ch2);
        System.out.println(<span class="hljs-string">&quot;&#x7426;&quot;</span>+(<span class="hljs-keyword">int</span>)ch2);
    }
}
<span class="hljs-comment">/* out
&#x9093;37011
&#x5B50;23376
&#x7426;23376
*/</span>
</code></pre>
<h3 id="&#x7EC3;&#x4E60;2-&#x5B57;&#x7B26;&#x4E32;&#x62FC;&#x63A5;-&#x6253;&#x5370;&#x4E2A;&#x4EBA;&#x4FE1;&#x606F;">&#x7EC3;&#x4E60;2 &#x5B57;&#x7B26;&#x4E32;&#x62FC;&#x63A5; &#x6253;&#x5370;&#x4E2A;&#x4EBA;&#x4FE1;&#x606F;</h3>
<blockquote>
<p>&#x58F0;&#x660E;&#x53D8;&#x91CF; String name&#x4FDD;&#x5B58;&#x4F60;&#x7684;&#x59D3;&#x540D;, int age &#x4FDD;&#x5B58;&#x4F60;&#x7684;&#x5E74;&#x9F84;</p>
<p>char gender &#x4FDD;&#x5B58;&#x4F60;&#x7684;&#x6027;&#x522B;, double height&#x4FDD;&#x5B58;&#x4F60;&#x7684;&#x8EAB;&#x9AD8;</p>
</blockquote>
<pre><code class="lang-java"><span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">PrintInfo</span></span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span></span>{
        String name = <span class="hljs-string">&quot;&#x9093;&#x5B50;&#x7426;&quot;</span>;
        <span class="hljs-keyword">int</span> age = <span class="hljs-number">23</span>;
        <span class="hljs-keyword">char</span> gender = <span class="hljs-string">&apos;&#x7537;&apos;</span>;
        <span class="hljs-keyword">int</span> height = <span class="hljs-number">180</span>;
        String info = <span class="hljs-string">&quot;&#x59D3;&#x540D;: &quot;</span> + name + <span class="hljs-string">&quot;,&#x5E74;&#x9F84;: &quot;</span> + age + <span class="hljs-string">&quot;,&#x6027;&#x522B;: &quot;</span> + gender + <span class="hljs-string">&quot;,&#x8EAB;&#x9AD8;: &quot;</span> +height;
        System.out.println(info);
    }
}
<span class="hljs-comment">/* out
&#x59D3;&#x540D;: &#x9093;&#x5B50;&#x7426;,&#x5E74;&#x9F84;: 23,&#x6027;&#x522B;: &#x7537;,&#x8EAB;&#x9AD8;: 180
*/</span>
</code></pre>
<h3 id="&#x7EC3;&#x4E60;3-&#x52A8;&#x6001;&#x6253;&#x5370;&#x8BA1;&#x7B97;&#x8FC7;&#x7A0B;">&#x7EC3;&#x4E60;3 &#x52A8;&#x6001;&#x6253;&#x5370;&#x8BA1;&#x7B97;&#x8FC7;&#x7A0B;</h3>
<blockquote>
<ol>
<li>&#x5199;&#x30FC;&#x4E2A; Variable&#x7C7B;&#xFF0C;main&#x65B9;&#x6CD5;&#x4E2D;&#x4F7F;&#x89D2;double&#x7C7B;&#x578B;&#x58F0;&#x660E;var1&#x548C;var2&#x53D8;&#x91CF;&#xFF0C;&#x7136;&#x540E;&#x7528;var2&#x4FDD;&#x5B58;var1&#x4E0E;var2&#x4E4B;&#x5546;&#x3002;</li>
<li>&#x58F0;&#x660E;&#x5B57;&#x7B26;&#x4E32;&#x53D8;&#x91CF;str,&#x7528;str&#x4E32;&#x63A5;&#x7684;&#x5F62;&#x8868;&#x793A;&#x4E0A;&#x8FF0;&#x8BA1;&#x7B97;&#x8FC7;&#x7A0B;&#x5E76;&#x6253;&#x5370;&#x8F93;&#x51FA;&#x7ED3;&#x679C;&#x3002;</li>
</ol>
</blockquote>
<pre><code class="lang-java"><span class="hljs-keyword">public</span> <span class="hljs-class"><span class="hljs-keyword">class</span> <span class="hljs-title">PublicDif</span></span>{
    <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span></span>{
        <span class="hljs-function"><span class="hljs-keyword">public</span> <span class="hljs-keyword">static</span> <span class="hljs-keyword">void</span> <span class="hljs-title">main</span><span class="hljs-params">(String[] args)</span></span>{
        <span class="hljs-keyword">double</span> var1 = <span class="hljs-number">200</span>;
        <span class="hljs-keyword">double</span> var2 = <span class="hljs-number">19</span>;
        String str = var1 + <span class="hljs-string">&quot; / &quot;</span> + var2 + <span class="hljs-string">&quot; = &quot;</span>;
        var2 = var1 / var2;
        str = str + var2;
        System.out.println(str);
    }
}
<span class="hljs-comment">/*out
200.0 / 19.0 = 10.526315789473685
*/</span>
</code></pre>
<h3 id="&#x7EC3;&#x4E60;4-16&#x8FDB;&#x5236;&#x4E0E;2&#x8FDB;&#x5236;&#x8F6C;10&#x8FDB;&#x5236;">&#x7EC3;&#x4E60;4 16&#x8FDB;&#x5236;&#x4E0E;2&#x8FDB;&#x5236;&#x8F6C;10&#x8FDB;&#x5236;</h3>
<pre><code class="lang-python"><span class="hljs-comment"># python</span>
<span class="hljs-comment"># &#x8BA1;&#x7B97; 0x6211&#x7684;&#x5341;&#x8FDB;&#x5236;</span>
x = <span class="hljs-number">6</span>*<span class="hljs-number">16</span>**<span class="hljs-number">3</span> + <span class="hljs-number">2</span>*<span class="hljs-number">16</span>**<span class="hljs-number">2</span> + <span class="hljs-number">1</span>*<span class="hljs-number">16</span>**<span class="hljs-number">1</span> + <span class="hljs-number">1</span>*<span class="hljs-number">16</span>**<span class="hljs-number">0</span>
print(x)
<span class="hljs-comment"># out</span>
<span class="hljs-comment"># 25105</span>
</code></pre>
<pre><code class="lang-python"><span class="hljs-comment"># python</span>
<span class="hljs-comment"># &#x8BA1;&#x7B97; 0001 1011 0110 1011 &#x7684;&#x5341;&#x8FDB;&#x5236;</span>
x = <span class="hljs-number">1</span>*<span class="hljs-number">2</span>**<span class="hljs-number">12</span> + <span class="hljs-number">1</span>*<span class="hljs-number">2</span>**<span class="hljs-number">11</span> + <span class="hljs-number">1</span>*<span class="hljs-number">2</span>**<span class="hljs-number">9</span> + <span class="hljs-number">1</span>*<span class="hljs-number">2</span>**<span class="hljs-number">8</span> + <span class="hljs-number">1</span>*<span class="hljs-number">2</span>**<span class="hljs-number">6</span> + <span class="hljs-number">1</span>*<span class="hljs-number">2</span>**<span class="hljs-number">5</span> + <span class="hljs-number">1</span>*<span class="hljs-number">2</span>**<span class="hljs-number">3</span> + <span class="hljs-number">1</span>*<span class="hljs-number">2</span>**<span class="hljs-number">1</span> + <span class="hljs-number">1</span>*<span class="hljs-number">2</span>**<span class="hljs-number">0</span>
print(x)
<span class="hljs-comment"># out</span>
<span class="hljs-comment"># 7019</span>
</code></pre>
<h3 id="&#x7EC3;&#x4E60;5-16&#x8FDB;&#x5236;&#x548C;2&#x8FDB;&#x5236;&#x4E92;&#x8F6C;">&#x7EC3;&#x4E60;5 16&#x8FDB;&#x5236;&#x548C;2&#x8FDB;&#x5236;&#x4E92;&#x8F6C;</h3>
<pre><code>&#x5C06; 0xA9384D5F &#x8F6C;&#x4E3A; 2&#x8FDB;&#x5236;
8421
1010 1001 0011 1000 0100 1101 0101 1111
</code></pre><pre><code>&#x5C06; 0101 0101 0111 1110 1000 0110 0101 1101
8421
0x557E865D
</code></pre><h3 id="&#x7EC3;&#x4E60;6-&#x6B63;&#x8D1F;2&#x8FDB;&#x5236;&#x8F6C;10&#x8FDB;&#x5236;&#x6570;">&#x7EC3;&#x4E60;6 &#x6B63;&#x8D1F;2&#x8FDB;&#x5236;&#x8F6C;10&#x8FDB;&#x5236;&#x6570;</h3>
<pre><code>0101 1110 &#x662F;&#x591A;&#x5C11;
0x5E
5*16**1 + 7*16**0 = 94
</code></pre><pre><code>1100 0011 &#x662F;&#x591A;&#x5C11;
-1
1100 0010
&#x53D6;&#x53CD;
0011 1101
&#x8F6C;16
0x3D
-61
</code></pre>
<script>console.log("plugin-popup....");document.onclick = function(e){ e.target.tagName === "IMG" && window.open(e.target.src,e.target.src)}</script><style>img{cursor:pointer}</style>
                                
                                </section>
                            
    </div>
    <div class="search-results">
        <div class="has-results">
            
            <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
            <ul class="search-results-list"></ul>
            
        </div>
        <div class="no-results">
            
            <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
            
        </div>
    </div>
</div>

                        </div>
                    </div>
                
            </div>

            
                
                <a href="DAY01 笔记.html#3良好的编程风格" class="navigation navigation-prev " aria-label="Previous page: 3.良好的编程风格">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="DAY02 回忆式笔记.html#基本数据类型" class="navigation navigation-next " aria-label="Next page: 基本数据类型">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"DAY02 数据类型到进制","level":"1.3","depth":1,"next":{"title":"基本数据类型","level":"1.3.1","depth":2,"anchor":"#基本数据类型","path":"DAY02 回忆式笔记.md","ref":"DAY02 回忆式笔记.md#基本数据类型","articles":[{"title":"引用类型和基本类型的区别","level":"1.3.1.1","depth":3,"anchor":"#引用类型和基本类型的区别","path":"DAY02 回忆式笔记.md","ref":"DAY02 回忆式笔记.md#引用类型和基本类型的区别","articles":[]},{"title":"浮点数为什么不精准整数是不是精准的为什么","level":"1.3.1.2","depth":3,"anchor":"#浮点数为什么不精准整数是不是精准的为什么","path":"DAY02 回忆式笔记.md","ref":"DAY02 回忆式笔记.md#浮点数为什么不精准整数是不是精准的为什么","articles":[]},{"title":"强类型的好处是什么","level":"1.3.1.3","depth":3,"anchor":"#强类型的好处是什么","path":"DAY02 回忆式笔记.md","ref":"DAY02 回忆式笔记.md#强类型的好处是什么","articles":[]},{"title":"简要描述java中的8种数据类型","level":"1.3.1.4","depth":3,"anchor":"#简要描述java中的8种数据类型","path":"DAY02 回忆式笔记.md","ref":"DAY02 回忆式笔记.md#简要描述java中的8种数据类型","articles":[]}]},"previous":{"title":"3.良好的编程风格","level":"1.2.4.3","depth":3,"anchor":"#3良好的编程风格","path":"DAY01 笔记.md","ref":"DAY01 笔记.md#3良好的编程风格","articles":[]},"dir":"ltr"},"config":{"plugins":["-lunr","-search","search-pro","expandable-chapters","popup","sharing-plus","pageview-count","splitter","back-to-top-button","code"],"styles":{"website":"style.css"},"pluginsConfig":{"tbfed-pagefooter":{"copyright":"&copy; HeDonghai","modify_label":"文件修订时间：","modify_format":"YYYY-MM-DD HH:mm:ss"},"splitter":{},"search-pro":{},"sharing-plus":{"qq":false,"all":["facebook","google","twitter","instapaper","linkedin","pocket","stumbleupon"],"douban":false,"facebook":true,"weibo":false,"instapaper":false,"whatsapp":false,"hatenaBookmark":false,"twitter":true,"messenger":false,"line":false,"vk":false,"pocket":true,"google":false,"viber":false,"stumbleupon":false,"qzone":false,"linkedin":false},"popup":{},"code":{"copyButtons":true},"fontsettings":{"theme":"white","family":"sans","size":2},"fontSettings":{"theme":"white","family":"msyh","size":2},"highlight":{},"theme-api":{"theme":"light"},"back-to-top-button":{},"pageview-count":{},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false},"expandable-chapters":{}},"theme":"default","author":"zh","pdf":{"pageNumbers":true,"fontSize":18,"fontFamily":"Arial","paperSize":"a4","chapterMark":"pagebreak","pageBreaksBefore":"/","margin":{"right":30,"left":30,"top":30,"bottom":50},"toc":true},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"JavaSE笔记","language":"zh-hans","gitbook":"*","description":"problem solving "},"file":{"path":"DAY02 回忆式笔记.md","mtime":"2021-08-23T02:07:15.653Z","type":"markdown"},"gitbook":{"version":"3.2.3","time":"2021-08-25T14:31:15.821Z"},"basePath":".","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="gitbook/gitbook.js"></script>
    <script src="gitbook/theme.js"></script>
    
        
        <script src="gitbook/gitbook-plugin-search-pro/jquery.mark.min.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-search-pro/search.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-expandable-chapters/expandable-chapters.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing-plus/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-pageview-count/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-splitter/splitter.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-back-to-top-button/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-code/plugin.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    

    </body>
</html>

